const routes = [
  {
    path: '/',
    redirect: '/home',
    access: 'normalAdmin',
  },
  {
    name: '首页',
    path: '/home',
    component: './Home',
    icon: 'home',
    access: 'normalAdmin',
  },
  {
    name: '管理员',
    path: '/admin',
    access: 'superAdmin',

    routes: [
      {
        name: '管理员列表',
        path: '/admin/adminList',
        component: './Admin/adminList',
        access: 'superAdmin',
      },
      {
        name: '添加管理员',
        path: '/admin/addAdmin',
        component: './Admin/addAdmin',
        access: 'superAdmin',
      },
    ],
    icon: 'icon-user',
  },
  {
    name: '用户',
    path: '/user',
    icon: 'icon-user-group',
    access: 'normalAdmin',

    routes: [
      {
        name: '用户列表',
        path: '/user/userList',
        component: './User/userList',
        access: 'normalAdmin',
      },
      {
        name: '添加用户',
        path: '/user/addUser',
        component: './User/addUser',
        access: 'normalAdmin',
      },
      {
        name: '编辑用户',
        path: '/user/editUser',
        component: './User/editUser',
        hideInMenu: true,
        access: 'normalAdmin',
      },
    ],
  },
  {
    name: '书籍',
    path: '/book',
    icon: 'icon-book1',
    access: 'normalAdmin',

    routes: [
      {
        name: '书籍列表',
        path: '/book/bookList',
        component: './Book/bookList',
        access: 'normalAdmin',
      },
      {
        name: '添加书籍',
        path: '/book/addBook',
        component: './Book/addBook',
        access: 'normalAdmin',
      },
      {
        name: '编辑书籍',
        path: '/book/editBook',
        component: './Book/editBook',
        hideInMenu: true,
        access: 'normalAdmin',
      },
    ],
  },
  {
    name: '面试题',
    path: '/interview',
    icon: 'icon-yuangongzonghefen-weidianji',
    access: 'normalAdmin',

    routes: [
      {
        name: '面试题列表',
        path: '/interview/interviewList',
        component: './Interview/interviewList',
        access: 'normalAdmin',

        routes: [
          {
            name: '题目详情',
            component: '@/pages/Interview/components/interviewDetail',
            path: '/interview/interviewList/interviewDetail',
            hideInMenu: true,
            access: 'normalAdmin',
          },
        ],
      },
      {
        name: '添加面试题',
        path: '/interview/addInterview',
        component: './Interview/addInterview',
        access: 'normalAdmin',
      },
      {
        name: '编辑题目',
        path: '/interview/editInterview',
        component: './Interview/editInterview',
        hideInMenu: true,
        access: 'normalAdmin',
      },
    ],
  },
  {
    name: '问答',
    path: '/issue',
    component: './Issue',
    icon: 'icon-wenda1',
    access: 'normalAdmin',
  },
  {
    name: '问答详情',
    path: '/issue/:id',
    component: './Issue/issueDetail',
    hideInMenu: true,
    access: 'normalAdmin',
  },
  {
    name: '评论',
    path: '/comment',
    component: './Comment',
    icon: 'icon-pinglun',
    access: 'normalAdmin',
  },
  {
    name: '类型',
    path: '/type',
    component: './Type',
    icon: 'icon-type',
    access: 'normalAdmin',
  },
  {
    name: '登录',
    path: '/login',
    component: './Login',
    menuRender: false,
    hideInMenu: true,
  },
];

export default routes;
